From 186c8f5254a7b9b29df6d9708a5d10f869d6829d Mon Sep 17 00:00:00 2001 From: Ignacio Casal Quinteiro Date: Fri, 17 Jul 2015 09:31:32 +0200 Subject: [PATCH] gdk: fix crash if visual is NULL cairo_xlib_surface_get_visual might return NULL so we need to check for NULL before trying to use it. https://bugzilla.gnome.org/show_bug.cgi?id=752520 --- gdk/x11/gdkglcontext-x11.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gdk/x11/gdkglcontext-x11.c b/gdk/x11/gdkglcontext-x11.c index c86cbd5a69..139fae6b97 100644 --- a/gdk/x11/gdkglcontext-x11.c +++ b/gdk/x11/gdkglcontext-x11.c @@ -326,6 +326,9 @@ glx_pixmap_get (cairo_surface_t *surface, guint texture_target) None }; + if (visual == NULL) + return NULL; + with_alpha = cairo_surface_get_content (surface) == CAIRO_CONTENT_COLOR_ALPHA; y_inverted = FALSE; -- 2.30.2